Closed
Bug 606158
Opened 15 years ago
Closed 14 years ago
duplicate null check of construct in NewProxyObject
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [fixed-in-tracemonkey])
Attachments
(1 file)
715 bytes,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
NewProxyObject(JSContext *cx, JSProxyHandler *handler, const Value &priv,
{
...
if (construct) {
obj->setSlot(JSSLOT_PROXY_CONSTRUCT,
construct can not be false here:
construct ? ObjectValue(*construct) : UndefinedValue());
}
Comment on attachment 485021 [details] [diff] [review]
patch
># HG changeset patch
># Parent 036e15ba851ab8f12969be9712f5e62afbbeb454
># User timeless@mozdev.org
>Bug 606158 duplicate null check of construct in NewProxyObject
>r=jorendorff
>
>diff --git a/js/src/jsproxy.cpp b/js/src/jsproxy.cpp
>--- a/js/src/jsproxy.cpp
>+++ b/js/src/jsproxy.cpp
>@@ -1074,8 +1074,7 @@ NewProxyObject(JSContext *cx, JSProxyHan
> if (fun) {
> obj->setSlot(JSSLOT_PROXY_CALL, call ? ObjectValue(*call) : UndefinedValue());
> if (construct) {
>- obj->setSlot(JSSLOT_PROXY_CONSTRUCT,
>- construct ? ObjectValue(*construct) : UndefinedValue());
>+ obj->setSlot(JSSLOT_PROXY_CONSTRUCT, ObjectValue(*construct));
> }
> }
> return obj;
Attachment #485021 -
Flags: review? → review?(jorendorff)
Comment 4•15 years ago
|
||
Comment on attachment 485021 [details] [diff] [review]
patch
timeless, r=me and I'm sure gal on that patch. Relieving jorendorff from having to stamp. Thanks for fixing,
/be
Attachment #485021 -
Flags: review?(jorendorff) → review+
Keywords: checkin-needed
![]() |
||
Updated•14 years ago
|
Attachment #485021 -
Flags: approval2.0?
Comment 5•14 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-tracemonkey]
Comment 6•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Attachment #485021 -
Flags: approval2.0?
Updated•7 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•